<template>
<div>
    <h1 ref='headerEle'>我是header</h1>
    <button @click ='getEle'>点击</button>
    <h1>{{name}},{{age}},{{sex}}</h1>
</div>
  
</template>

<script>
export default {
    name:'Header',
    methods:{
        getEle(){
            console.log(this.$refs.headerEle)
        }
    },
    props:["name","age","sex"]
}
</script>,

<style>

</style>